package com.yungui.libary.service;

import com.auth0.jwt.JWT;
import com.auth0.jwt.algorithms.Algorithm;
import com.yungui.libary.entity.User;
import com.yungui.libary.util.JwtUtil;
import org.springframework.stereotype.Service;

@Service
public class TokenService {
    public String getAccessToken(User user) {
        String token = JwtUtil.signAccessToken(user.getId());
        return token;
    }
    public String getRefreshToken(User user) {
        String token = JwtUtil.signRefreshToken(user.getId());
        return token;
    }
}
